package logo.sys;

import java.util.Stack;

public class LogoState 
{
    Stack stack;
    LogoDictionary dict;
    Turtle turtle;
    
    public LogoState() {
	stack = new Stack();
	dict = new LogoDictionary();
	turtle = new Turtle();
    }

    public LogoState(Stack s, LogoDictionary ld, Turtle t) {
	stack = s;
	dict = ld;
	turtle = t;
    }
    
    public LogoDictionary getDict() {
	return dict;
    }

    public void setDict(LogoDictionary d) {
	dict = d;
    }
    
    public Stack getStack() {
	return stack;
    }

    public void setStack(Stack s) {
	stack = s;
    }
    
    public Turtle getTurtle() {
	return turtle;

    }

    /** Returns true if there are no further commands to execute. */
    public boolean isDone() {
	return stack.empty();
    }
    
    /** Perform one computational step with this Logo state */
/*    public void step() throws LogoException {
	if (!stack.empty()) {
	    // remove the next command from the stack
	    IRCmd command = (IRCmd) stack.pop();
	    // execute it on the state after the command is removed.
	   ;
	} else
	    throw new LogoHaltException();
    }
*/    
}
